package com.leoman.dao;

import com.leoman.entity.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

/**
 * Created by 涂奕恒 on 2014/12/4 16:16.
 */
public interface UserDao extends JpaRepository<User, Integer> {

    @Query("select a from User a where a.account = ?1")
    public User findOneByAccount(String account);

    @Query("select a from User a where a.account = ?1 and a.password = ?2")
    public User findOneByParams(String account, String password);
}